package cn.jdy.plugins.entity;

import cn.jdy.common.bo.BaseEntry;
import cn.jdy.framework.db.hibernate.Validator;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.UniqueConstraint;

import java.io.Serializable;

/**
 * 客户端用户
 */
@Entity
public class Member extends BaseEntry implements Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
	@Column(length = 32)
	private String id;// 用户标识
	@Validator
	private String userName;// 用户名 登录使用
	@Validator
	private String mobile;// 手机号
	@Validator
	private String password;// 密码
	@Validator
	private String email;// 邮箱地址
	@Validator
	private String signature;// 个性签名
	@Validator
	private String photo;// 头像地址
	@Validator
	private String birthday;// 生日
	@Validator
	private String sex;// 性别  0 男 1女
	@Validator
	private String country;// 所属国家
	@Validator
	private String longitude;// 所在维度
	@Validator
	private String latitude;// 所在经度
	@Validator
	private String lastLoginDate;// 最后登陆时间
	@Validator
	private String userType;// 0 个人 1 企业
	@Validator
	private String status;//用户状态  0正常  1 禁用
	@Validator
	private String approve;//用户认证状态  0待认证, 1认证通过, 2审核不通过, 3已提交审核资料
	@Validator
	private Integer score;// 积分
	@Validator
	private Integer money;// S币

	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "companyId")
	private Company company;

	@Validator
	private String realname;// 真实姓名/身份证上姓名
	@Validator
	private String cardNum;// 身份证号码
	@Validator
	private String cardImgUrl;//证件照地址
	@Validator
	private String province;// 省
	@Validator
	private String city;// 所属地市
	@Validator
	private String district;// 所属区域
	@Validator
	private String areaCode;// 固定电话区号
	@Validator
	private String telPhone;// 电话号码
	@Validator
	private String qq;// QQ号码
	private String companyName;//单位名称
	private String job;// 职务
	private String personalLocation;//个人住址
	private String companyLocation;//单位住址
	//会员中心
	private String cash;//现金数量
	private String coupon;//优惠券个数
	private String deposit;//提现金额
	//可删，可查
	private String userLevel;//用户等级
	private String redeem;//优惠券兑换记录
	private String orders;//订单数量
	private String check_ins;//签到次数
	private String messages;//消息数量
	//private String safety;//安全中心????
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getSignature() {
		return signature;
	}

	public void setSignature(String signature) {
		this.signature = signature;
	}

	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	public String getLastLoginDate() {
		return lastLoginDate;
	}

	public void setLastLoginDate(String lastLoginDate) {
		this.lastLoginDate = lastLoginDate;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getApprove() {
		return approve;
	}

	public void setApprove(String approve) {
		this.approve = approve;
	}

	public Integer getScore() {
		return score;
	}

	public void setScore(Integer score) {
		this.score = score;
	}

	public Integer getMoney() {
		return money;
	}

	public void setMoney(Integer money) {
		this.money = money;
	}

	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname;
	}

	public String getCardNum() {
		return cardNum;
	}

	public void setCardNum(String cardNum) {
		this.cardNum = cardNum;
	}

	public String getCardImgUrl() {
		return cardImgUrl;
	}

	public void setCardImgUrl(String cardImgUrl) {
		this.cardImgUrl = cardImgUrl;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district;
	}

	public String getAreaCode() {
		return areaCode;
	}

	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}

	public String getTelPhone() {
		return telPhone;
	}

	public void setTelPhone(String telPhone) {
		this.telPhone = telPhone;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public String getPersonalLocation() {
		return personalLocation;
	}

	public void setPersonalLocation(String personalLocation) {
		this.personalLocation = personalLocation;
	}

	public String getCompanyLocation() {
		return companyLocation;
	}

	public void setCompanyLocation(String companyLocation) {
		this.companyLocation = companyLocation;
	}

	public String getUserLevel() {
		return userLevel;
	}

	public void setUserLevel(String userLevel) {
		this.userLevel = userLevel;
	}

	public String getCash() {
		return cash;
	}

	public void setCash(String cash) {
		this.cash = cash;
	}

	public String getCoupon() {
		return coupon;
	}

	public void setCoupon(String coupon) {
		this.coupon = coupon;
	}

	public String getDeposit() {
		return deposit;
	}

	public void setDeposit(String deposit) {
		this.deposit = deposit;
	}

	public String getRedeem() {
		return redeem;
	}

	public void setRedeem(String redeem) {
		this.redeem = redeem;
	}

	public String getOrders() {
		return orders;
	}

	public void setOrders(String orders) {
		this.orders = orders;
	}

	public String getCheck_ins() {
		return check_ins;
	}

	public void setCheck_ins(String check_ins) {
		this.check_ins = check_ins;
	}

	public String getMessages() {
		return messages;
	}

	public void setMessages(String messages) {
		this.messages = messages;
	}

}